import { makeAutoObservable } from 'mobx'
import axios from '../../../utils/axios'
class hygetdataMobox {
    // 定义表单数据
    searchdata = []
    constructor() {
        makeAutoObservable(this)
    }
    // 定义修改函数
    updatedlist = (a, b, c, d, e, f) => {
        axios({
            url: "/inner_contact/findUserByCondition",
            method: "get",
            params: {
                user_name: a,
                phone_number: b,
                sex: c,
                department: d,
                start_time: e,
                resignation_status: f,
                current_page: 1,
                page_size: 10,
            }
        }).then((res) => {
            this.searchdata = res.data
            console.log(res);
        }).then((err) => {
            console.log(err);
        })
    }
    updatedlist2=(a)=>{
        axios({
            url: "/inner_contact/findUserByCondition",
            method: "get",
            params: {
                user_name: a,
                phone_number: a,
                current_page: 1,
                page_size: 5
            }
        }).then((res) => {
            this.searchdata = res.data
            console.log(res);
        }).then((err) => {
            console.log(err);
        })
    }
    updatedlist3=(a)=>{
        axios({
            url: "/inner_contact/findUserByCondition",
            method: "get",
            params: {
                department: a,
                current_page: 1,
                page_size: 10
            }
        }).then((res) => {
            this.searchdata = res.data
            console.log(res);
        }).then((err) => {
            console.log(err);
        })
    }

    

}
const getdataMobox =new hygetdataMobox()
export default getdataMobox

